namespace xhtml = "http://www.w3.org/1999/xhtml"

xhtml:div [
  "\x{a}" ~
  "     "
  xhtml:title [ "Relax NG flat schema for our library" ]
  "\x{a}" ~
  "     "
  xhtml:p [
    "This schema has been written by "
    xhtml:a [ href = "http://dyomedea.com/vdv" "Eric van der Vlist" ]
    "."
  ]
  "\x{a}" ~
  "   "
]
start = element library { book-element+ }
[ xhtml:p [ "Definition of the author element" ] ]
author-element =
  element author {
    attribute id { text },
    name-element,
    born-element,
    dead-element?
  }
book-start =
  attribute id { text },
  isbn-element,
  title-element,
  author-element*
book-end =
  author-element*,
  character-element*,
  attribute available { text }
book-element = element book { book-start, book-end }
born-element = element born { text }
character-element =
  element character {
    attribute id { text },
    name-element,
    born-element,
    qualification-element
  }
dead-element = element dead { text }
isbn-element = element isbn { text }
name-element = element name { text }
qualification-element = element qualification { text }
title-element =
  element title {
    attribute xml:lang { text },
    text
  }
